package com.citasgoo.admin.dao;

import com.citasgoo.admin.entity.SysRole;
import com.citasgoo.admin.entity.SysRoleQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysRoleDao {
    int countByExample(SysRoleQuery example);

    int deleteByExample(SysRoleQuery example);

    int deleteByPrimaryKey(Integer id);

    int insert(SysRole record);

    int insertSelective(SysRole record);

    List<SysRole> selectByExample(SysRoleQuery example);

    SysRole selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") SysRole record, @Param("example") SysRoleQuery example);

    int updateByExample(@Param("record") SysRole record, @Param("example") SysRoleQuery example);

    int updateByPrimaryKeySelective(SysRole record);

    int updateByPrimaryKey(SysRole record);

    List<SysRole> findExistRoleAllUserRoleByUserId(Integer id);

    SysRole findTopRoleByUserId(@Param("id") Integer id);
}